LAMMPS (4 May 2022)
  using 1 OpenMP thread(s) per MPI task
# sample LAMMPS input script for thermal conductivity of liquid LJ
# Green-Kubo method via compute heat/flux and fix ave/correlate

# settings

variable        x equal 10
variable        y equal 10
variable        z equal 10

variable        rho equal 0.6
variable        t equal 1.35
variable        rc equal 2.5

#variable       rho equal 0.85
#variable        t equal 0.7
#variable       rc equal 3.0

variable    p equal 200     # correlation length
variable    s equal 10      # sample interval
variable    d equal $p*$s   # dump interval
variable    d equal 200*$s   
variable    d equal 200*10   

# setup problem

units           lj
atom_style      atomic

lattice         fcc ${rho}
lattice         fcc 0.6
Lattice spacing in x,y,z = 1.8820721 1.8820721 1.8820721
region          box block 0 $x 0 $y 0 $z
region          box block 0 10 0 $y 0 $z
region          box block 0 10 0 10 0 $z
region          box block 0 10 0 10 0 10
create_box      1 box
Created orthogonal box = (0 0 0) to (18.820721 18.820721 18.820721)
  2 by 2 by 2 MPI processor grid
create_atoms    1 box
Created 4000 atoms
  using lattice units in orthogonal box = (0 0 0) to (18.820721 18.820721 18.820721)
  create_atoms CPU = 0.001 seconds
mass            1 1.0

velocity        all create $t 87287
velocity        all create 1.35 87287

pair_style      lj/cut ${rc}
pair_style      lj/cut 2.5
pair_coeff      1 1 1.0 1.0

neighbor        0.3 bin
neigh_modify    delay 0 every 1

# 1st equilibration run

fix             1 all nvt temp $t $t 0.5
fix             1 all nvt temp 1.35 $t 0.5
fix             1 all nvt temp 1.35 1.35 0.5
thermo          100
run             1000
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
  update every 1 steps, delay 0 steps, check yes
  max neighbors/atom: 2000, page size: 100000
  master list distance cutoff = 2.8
  ghost atom cutoff = 2.8
  binsize = 1.4, bins = 14 14 14
  1 neighbor lists, perpetual/occasional/extra = 1 0 0
  (1) pair lj/cut, perpetual
      attributes: half, newton on
      pair build: half/bin/atomonly/newton
      stencil: half/bin/3d
      bin: standard
Per MPI rank memory allocation (min/avg/max) = 3.108 | 3.108 | 3.108 Mbytes
   Step          Temp          E_pair         E_mol          TotEng         Press     
         0   1.35          -4.1241917      0             -2.0996979     -3.1962625    
       100   1.1997886     -3.7796264      0             -1.9803934      0.4889458    
       200   1.271238      -3.7354981      0             -1.8291178      0.6873844    
       300   1.3346808     -3.6942841      0             -1.6927634      0.84332881   
       400   1.4020848     -3.7118654      0             -1.6092641      0.87670585   
       500   1.3723622     -3.6917931      0             -1.6337644      0.92172921   
       600   1.3451676     -3.7281573      0             -1.7109103      0.76029091   
       700   1.3021567     -3.6876155      0             -1.7348687      0.82721085   
       800   1.3489121     -3.7082852      0             -1.6854229      0.86438061   
       900   1.3708803     -3.6966168      0             -1.6408103      0.921415     
      1000   1.3640742     -3.7075319      0             -1.6619322      0.86651332   
Loop time of 0.508902 on 8 procs for 1000 steps with 4000 atoms

Performance: 848886.657 tau/day, 1965.015 timesteps/s
98.2% CPU use with 8 MPI tasks x 1 OpenMP threads

MPI task timing breakdown:
Section |  min time  |  avg time  |  max time  |%varavg| %total
---------------------------------------------------------------
Pair    | 0.25474    | 0.26957    | 0.27746    |   1.4 | 52.97
Neigh   | 0.11684    | 0.12283    | 0.13178    |   1.3 | 24.14
Comm    | 0.07187    | 0.089583   | 0.10975    |   3.5 | 17.60
Output  | 0.00026594 | 0.00041865 | 0.0014818  |   0.0 |  0.08
Modify  | 0.016091   | 0.017624   | 0.018502   |   0.7 |  3.46
Other   |            | 0.008882   |            |       |  1.75

Nlocal:            500 ave         510 max         479 min
Histogram: 1 0 0 0 0 2 1 1 0 3
Nghost:           1519 ave        1539 max        1509 min
Histogram: 2 0 4 0 0 0 0 1 0 1
Neighs:        13553.8 ave       14051 max       12567 min
Histogram: 1 0 0 0 1 0 2 1 1 2

Total # of neighbors = 108430
Ave neighs/atom = 27.1075
Neighbor list builds = 155
Dangerous builds = 0

velocity        all scale $t
velocity        all scale 1.35

unfix           1

# thermal conductivity calculation

reset_timestep  0

compute         myKE all ke/atom
compute         myPE all pe/atom
compute         myStress all stress/atom NULL virial
compute         flux all heat/flux myKE myPE myStress
variable        Jx equal c_flux[1]/vol
variable        Jy equal c_flux[2]/vol
variable        Jz equal c_flux[3]/vol

fix             1 all nve
fix             JJ all ave/correlate $s $p $d                 c_flux[1] c_flux[2] c_flux[3] type auto                 file profile.heatflux ave running
fix             JJ all ave/correlate 10 $p $d                 c_flux[1] c_flux[2] c_flux[3] type auto                 file profile.heatflux ave running
fix             JJ all ave/correlate 10 200 $d                 c_flux[1] c_flux[2] c_flux[3] type auto                 file profile.heatflux ave running
fix             JJ all ave/correlate 10 200 2000                 c_flux[1] c_flux[2] c_flux[3] type auto                 file profile.heatflux ave running

variable        scale equal $s*dt/$t/$t/vol
variable        scale equal 10*dt/$t/$t/vol
variable        scale equal 10*dt/1.35/$t/vol
variable        scale equal 10*dt/1.35/1.35/vol
variable        k11 equal trap(f_JJ[3])*${scale}
variable        k11 equal trap(f_JJ[3])*4.11522633744856e-06
variable        k22 equal trap(f_JJ[4])*${scale}
variable        k22 equal trap(f_JJ[4])*4.11522633744856e-06
variable        k33 equal trap(f_JJ[5])*${scale}
variable        k33 equal trap(f_JJ[5])*4.11522633744856e-06
variable        kappa equal (v_k11+v_k22+v_k33)/3.0

thermo          $d
thermo          2000
thermo_style    custom step temp v_Jx v_Jy v_Jz v_k11 v_k22 v_k33 v_kappa
thermo_modify   colname v_Jx Jx colname v_Jy Jy colname v_Jz Jz                 colname v_k11 kappa_11 colname v_k22 kappa_22                 colname v_k33 kappa_33 colname v_kappa kappa

run             100000
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Per MPI rank memory allocation (min/avg/max) = 4.986 | 4.986 | 4.986 Mbytes
   Step          Temp            Jx             Jy             Jz          kappa_11       kappa_22       kappa_33        kappa     
         0   1.35           0.012561273   -0.087295611   -0.037041124    0.014429409    0.69689289     0.12547278     0.27893169   
      2000   1.3455113     -0.034571206   -0.17570902    -0.057218308   -1.6110148      7.9287556      8.5035767      4.9404392    
      4000   1.3477761     -0.029528723    0.018790489    0.056107464    7.698411       1.9459053      9.9605272      6.5349478    
      6000   1.3411436     -0.20281149     0.2184806      0.036024028    4.6533075      1.6223216      3.7246529      3.3334273    
      8000   1.3561682      0.12038719     0.034930957    0.12173601     4.6450263      1.9032849      2.7566363      3.1016492    
     10000   1.3397694     -0.14241489    -0.10956496     0.053088086    6.4191535      3.1582257      2.2786677      3.9520156    
     12000   1.3410756      0.0033462395   0.14337321     0.16381733     5.9663779      1.6774436      1.7442075      3.129343     
     14000   1.3484928      0.0080419803  -0.080232102    0.039035519    4.9483626      1.6210893      1.6103343      2.7265954    
     16000   1.3414836     -0.11063045    -0.031557643    0.032060333    6.1381241      1.438198       1.5831541      3.0531587    
     18000   1.3488617      0.15908507    -0.021418806   -0.13992507     5.9198613      1.1016464      1.2905478      2.7706852    
     20000   1.3535727      0.13217689     0.071933521   -0.028452943    6.3746606      1.003194       1.7007101      3.0261882    
     22000   1.3408534     -0.078953557   -0.0022323663  -0.22979033     5.0105241      1.1489328      1.720847       2.626768     
     24000   1.34722        0.074784199   -0.071218632    0.15238165     4.4835452      0.94086945     3.1603615      2.8615921    
     26000   1.3539218      0.052534363    0.10419096     0.1866213      4.2233104      1.3973253      3.2802881      2.9669746    
     28000   1.3510105      0.0080425673  -0.03723976     0.20758595     5.261917       1.1931088      3.498831       3.3179523    
     30000   1.3410807     -0.043957884    0.065683978    0.015386362    4.3815277      1.5000017      3.2237565      3.0350953    
     32000   1.34766       -0.060481287    0.17142383     0.034367135    4.0974942      1.1637027      3.3771953      2.8794641    
     34000   1.3417583     -0.10055844     0.050237668    0.06974988     4.1478021      1.0235517      2.9440249      2.7051263    
     36000   1.3468728      0.09375756    -0.17875264    -0.063513807    4.4412987      0.71084371     3.4316313      2.8612579    
     38000   1.3496868     -0.038635804    0.117965       0.018050271    4.962332       0.41701129     3.4690212      2.9494548    
     40000   1.3403452     -0.092158116    0.14432655    -0.062258229    4.9980486      0.3762815      3.1688552      2.8477284    
     42000   1.3498661      0.085807945    0.010256385   -0.002956898    4.8200626      0.29278287     3.094633       2.7358261    
     44000   1.3564084     -0.07415163    -0.051327929   -0.18457986     4.7070907      0.3358167      3.0741797      2.7056957    
     46000   1.3435866     -0.013911463    0.081813372    0.022628846    4.6043718      0.3682401      2.9956189      2.6560769    
     48000   1.350611       0.036512747    0.080481423   -0.22973181     4.5648715      0.32728516     3.8573343      2.916497     
     50000   1.3421783      0.057665789    0.075597141    0.17377918     4.4278473      0.5383886      3.5866168      2.8509509    
     52000   1.3473497     -0.11159587    -0.09688769     0.19876168     4.3876613      0.43408155     3.4786305      2.7667911    
     54000   1.3459495     -0.15341705     0.063996148   -0.0038254597   4.8434026      0.62047297     3.445187       2.9696875    
     56000   1.3545654     -0.082406034    0.089232864   -0.024355614    4.546051       0.7367607      3.3694561      2.8840893    
     58000   1.3577504      0.082844384    0.019500036    0.073721698    4.4061886      1.4575694      3.2754066      3.0463882    
     60000   1.348614      -0.16190321    -0.048576343    0.093820555    4.2946463      1.3416919      3.1159234      2.9174205    
     62000   1.3551143      0.097443296   -0.04420265    -0.25713945     4.1260882      1.2550603      3.063215       2.8147879    
     64000   1.346239       0.019198575   -0.095746619    0.18383922     4.5691519      1.2615165      2.9935539      2.9414074    
     66000   1.3535383     -0.0035547901  -0.1753318      0.014025292    4.5371394      1.0740671      2.9362916      2.8491661    
     68000   1.3421249     -0.18217113     0.077901408    0.04314081     5.1644747      1.0218342      2.9789097      3.0550729    
     70000   1.3446114      0.029565781   -0.13771336     0.050328878    5.4811405      1.0430806      2.9748623      3.1663612    
     72000   1.3692655      0.005711741    0.13966773    -0.062638787    5.3033385      1.1040582      2.7599218      3.0557729    
     74000   1.3405365     -0.054281977    0.038019086   -0.024980877    5.1246258      2.0782965      2.725331       3.3094177    
     76000   1.3644178      0.040847675   -0.051968108   -0.12259032     5.1218657      1.8504273      2.6804003      3.2175644    
     78000   1.353792      -0.093663092    0.018784967   -0.073871437    5.025196       1.7789709      2.5339006      3.1126891    
     80000   1.3520982     -0.09407101     0.010328039    0.0028841073   5.1410049      1.855057       2.6935895      3.2298838    
     82000   1.3447597     -0.11935066    -0.2184608      0.073543056    5.2645334      1.7883077      4.2012292      3.7513568    
     84000   1.3712151     -0.064367612    0.021246872   -0.033571866    5.0479674      1.8947341      4.3856536      3.7761184    
     86000   1.3453867     -0.029842112   -0.042297039    0.05422886     5.0667777      2.0365983      4.4542311      3.8525357    
     88000   1.3439543     -0.21625828    -0.028119372   -0.010320332    4.9946428      2.3095763      4.3429587      3.8823926    
     90000   1.3472579      0.058391002    0.037139373    0.03424008     5.0599004      2.8132794      4.4503426      4.1078408    
     92000   1.361788       0.028891114    0.072799744   -0.12035229     4.8759851      2.5130025      4.2747068      3.8878981    
     94000   1.3440566      0.043421348    0.049653856   -0.060444094    4.8884081      2.5072981      4.3105221      3.9020761    
     96000   1.3537566      0.088733517   -0.11449828    -0.049852036    4.8115085      2.4780963      4.2213579      3.8369876    
     98000   1.3373399      0.25457663    -0.041723778    0.00084565184  4.7163394      2.4100822      4.485536       3.8706525    
    100000   1.3487502      0.046333889    0.1247351      0.063467467    4.6563279      2.4049358      4.5742925      3.8785187    
Loop time of 53.5266 on 8 procs for 100000 steps with 4000 atoms

Performance: 807074.833 tau/day, 1868.229 timesteps/s
98.9% CPU use with 8 MPI tasks x 1 OpenMP threads

MPI task timing breakdown:
Section |  min time  |  avg time  |  max time  |%varavg| %total
---------------------------------------------------------------
Pair    | 29.794     | 30.392     | 31.376     |   8.7 | 56.78
Neigh   | 12.248     | 12.475     | 12.79      |   4.5 | 23.31
Comm    | 6.5584     | 7.5712     | 8.3818     |  19.5 | 14.14
Output  | 0.016848   | 0.067296   | 0.074694   |   7.4 |  0.13
Modify  | 2.0311     | 2.0593     | 2.1324     |   2.1 |  3.85
Other   |            | 0.9616     |            |       |  1.80

Nlocal:            500 ave         505 max         491 min
Histogram: 1 0 0 1 0 1 0 2 2 1
Nghost:        1529.88 ave        1548 max        1508 min
Histogram: 1 1 0 0 1 1 2 0 0 2
Neighs:        13569.8 ave       13906 max       13235 min
Histogram: 1 1 0 1 1 1 1 1 0 1

Total # of neighbors = 108558
Ave neighs/atom = 27.1395
Neighbor list builds = 16041
Dangerous builds = 0

print           "Running average thermal conductivity: $(v_kappa:%.2f)"
Running average thermal conductivity: 3.88
Total wall time: 0:00:54
